package net.jxiny.oschina.synthetical.Adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import net.jxiny.oschina.R;
import net.jxiny.oschina.synthetical.enyity.Information;

import java.util.List;

public class InformationAdapter extends BaseQuickAdapter<Information,BaseViewHolder> {


    public InformationAdapter(int layoutResId, @Nullable List<Information> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, Information item) {

        helper.setText(R.id.information_title,item.getTitle());
        helper.setText(R.id.information_time,item.getPubDate());
        helper.setText(R.id.information_author,item.getAuthor());
        helper.setText(R.id.information_commentCount,item.getCommentCount());

    }

}
